Some computing systems provide a natural user interface in which the system may be controlled using gestures or spoken commands. For example, these systems may include a color camera (e.g., an RGB camera) and/or a depth camera for capturing images of an environment to detect motion and identify gestures. The depth camera may comprise an active illumination depth camera that utilizes time-of-flight (TOF) or structured light techniques for obtaining depth information. The color camera may capture a portion of the environment as a color image and the depth camera may capture a portion of the environment as a depth map. A depth map may comprise a two-dimensional image of the environment that includes depth information relating to the distances to objects within the environment from a particular reference point, such as a point associated with the depth camera. Each pixel in the two-dimensional image may be associated with a depth value representing a linear distance from the particular reference point.
A variety of techniques may be used to generate a depth map such as structured light illumination and time of flight techniques. Structured light illumination involves projecting a light pattern into an environment, capturing an image of the reflected light pattern, and then determining distance information from the spacings and/or distortions associated with the reflected light pattern relative to the projected light pattern. The light pattern may be projected using light that is invisible to the naked eye (e.g., IR or UV light) and may comprise a single dot, a single line, or a variety of dimensional patterns (e.g., horizontal and vertical lines, or checkerboard patterns). Time of flight techniques may determine distances to objects within an environment by timing how long it takes for light transmitted from a light source to travel to the objects and reflect back to an image sensor. In some cases, a short light pulse (or series of light pulses) may be projected into the environment at a first point in time and reflections associated with the short light pulse may be captured at a second point in time subsequent to the first point in time. A time of flight system may adjust the time difference between the first point in time and the second point in time in order to detect objects at a particular distance (or over a range of distances) associated with the time difference.